<script setup>
import { ref, onMounted, toRefs } from 'vue'
import {unit2} from '../unit.js'

defineProps({
    config: Object,
});



</script>

<template>

<div class="titlerow title-app" :style="{background: config.backgroundColor}">
    <h1 :style="{
        fontSize: unit2(config.fontSize),
        color: config.color,
        textAlign: config.align,
    }">{{ config.name }}</h1>
</div>

</template>

<style scoped>
    .titlerow{width: 100%;overflow: hidden;line-height: 2.7;}
    /* 一般使用于APP顶部浮动标题，可针对title-app做样式处理，如：.title-app h1 {position: fixed;} */
    .titlerow h1{width: 100%;margin: 0;padding: 0;font-weight: bold;text-align: center;}
</style>